<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head lang="en">
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <link rel="stylesheet" href="<%=basePath%>css/login/login.css">
	<style>.error{color:red;}</style>
</head>
<body>
<div class="page">

        <div class="center">

            <div class="info">
                <div class="info-up">
                    <div class="login-content">
					<form action="<%=request.getContextPath() %>/user/login" method="post">
                        <div class="txt-wap">&nbsp;<input type="text" id="username" name="username" class="txt" value="用户名"  ></div>
                        <div class="txt-wap">&nbsp;<input type="password" id="pwd" name="password" class="txt" value="密码" ></div>
                            <input type="submit"  class="login-btn" value="登录">
					</form>
                    </div>

                </div>
            </div>
			<div class="error">${errorInfo}</div>
        </div>

</div>
</body>
<script >
    var user=document.getElementById("username");
    user.onfocus=function(){if(this.value==this.defaultValue)this.value=''};
    user.onblur=function (){if(/^\s*$/.test(this.value)){this.value=this.defaultValue;this.style.color='#b3b3b3'}}
    user.onkeydown=function(){this.style.color='#000'}
    var pwd=document.getElementById("pwd");
    pwd.onfocus=function(){if(this.value==this.defaultValue)this.value=''};
    pwd.onblur=function (){if(/^\s*$/.test(this.value)){this.value=this.defaultValue;this.style.color='#b3b3b3'}}
    pwd.onkeydown=function(){this.style.color='#000'}
</script>
</html>